export interface Respond<T = Record<string, any>> {
  code: number
  msg: string
  data: T
}

export type PageRespond<T = Record<string, any>, D = Record<string, any>> = {
  rows: T[]
  total: number
} & Respond<D>

export type OneRespond<T = Record<string, any>, D = Record<string, any>> = {
  rows: [T]
} & Respond<D>

export type PageData<T = Record<string, any>> = { items: T[], count: number, [key: string]: any }
export type OneData<T = Record<string, any>> = { items: [T], [key: string]: any }

export type PageInfo = {
  perpage: number
  page: number

  orderByColumn?: string
  isAsc?: 'desc' | 'asc'
}


